package base.service.impl;

import java.util.Arrays;

import javax.jws.soap.SOAPBinding.Use;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import base.dao.UserDao;
import base.model.User;
import base.service.UserService;
import tk.mybatis.mapper.entity.Example;

@Service
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService{
	@Autowired
	private UserDao userDao;

	@Override
	public int delete(String ids) {
		Example example = new Example(User.class);
		example.createCriteria().andIn("id", Arrays.asList(ids.split(",")));
		return userDao.deleteByExample(example);
	}

	@Override
	public User selectByUsername(String username) {
		return userDao.selectByUsername(username);
	}
}
